<template>
  <div class="basket">
    <ul>
      <li v-for="v in basketItems" :key="v.product_id">
        <div class="basket-img">
          <img :src="v.product_img_url" alt="" />
        </div>
        <div class="basket-list">
          <span>{{ v.product_name }}</span>
          <span>￥{{ v.product_uprice }}</span>
          <span>数量: {{ v.count }}</span>
        </div>
      </li>
    </ul>
  </div>
</template>

<script setup>
import { basketStore } from "@/store/basekt";
import { storeToRefs } from "pinia";

const useBasketStore = basketStore();
const { basketItems } = storeToRefs(useBasketStore);
</script>

<style scoped></style>
